package com.atjava.webspider.model;

import com.atjava.jox.annotation.ClassProps;
import com.atjava.jox.annotation.FieldProps;
import com.atjava.jox.annotation.FieldProps.ElementType;
import com.atjava.webspider.gui.output.NewOutputGui;
import com.atjava.webspider.logic.Named;

@ClassProps(alias="output")
public class Output implements Named{
	
	@FieldProps
	private String name;
	
	/** 1:不输出    2:输出XML  3:使用模板 */
	@FieldProps
	private int type;
	
	/** 页面名称 */
	@FieldProps
	private String page;
	
	@FieldProps
	private String path;

	/** 模板 */
	@FieldProps
	private String template;
	
	/** 分页及递归表达式 */
	@FieldProps(type=ElementType.ELEMENT,alias = "url-regexp")
	private String urlRegexp;
	
	public String getTypeName(){
		return NewOutputGui.OUTPUT_STATE[this.type];
	}
	
	public String getUrlRegexp() {
		return urlRegexp;
	}

	public void setUrlRegexp(String urlRegexp) {
		this.urlRegexp = urlRegexp;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getTemplate() {
		return template;
	}

	public void setTemplate(String template) {
		this.template = template;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}
}
